home *** CD-ROM | disk | FTP | other *** search
- Path: rcp6.elan.af.mil!rscernix!danpop
- Newsgroups: comp.lang.c
- Subject: Re: Error: FILE *rl_instream = stdin; initializer is not a constant
- Message-ID: <danpop.823804447@rscernix>
- From: danpop@mail.cern.ch (Dan Pop)
- Date: 8 Feb 96 18:34:07 GMT
- References: <4fbenh$60s@news1.sympatico.ca>
- Organization: Air Force Flight Test Center
- NNTP-Posting-Host: ues5.cern.ch
- X-Newsreader: NN version 6.5.0 #7 (NOV)
-
- In <4fbenh$60s@news1.sympatico.ca> Stephane Lajeunesse <slajeunesse@sympatico.ca> writes:
-
- >When I'm comiling this using GCC 2.5.8 on Xenix, this type of
- >initialization doesn't work:
- >
- >FILE *rl_inputstream = stdin;
- >
- >It halts with a message :
- >
- >initializer is not a constant
-
- If the declaration has file scope, it doesn't have to work, because
- stdin is not required to be a constant expression.
-
- >Any ideas on how I can work around this problem.
-
- Initialize rl_inputstream in main (this is where global variables are
- supposed to be initialized, when they cannot be initialized at the same
- place they're defined).
-
- Dan
- --
- Dan Pop
- CERN, CN Division
- Email: danpop@mail.cern.ch
- Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
-